//
//  ZWLViewController.m
//  ZWLDatePickerView
//
//  Created by zjy on 06/04/2018.
//  Copyright (c) 2018 zjy. All rights reserved.
//

#import "ZWLViewController.h"
#import <ZWLDatePickerView/ZWLDatePickerView.h>


@interface ZWLViewController ()<ZWLDatePickerViewDelegate>

@end

@implementation ZWLViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    ZWLDatePickerView *zwlDatePickerView = [ZWLDatePickerView createFromXib];
    [zwlDatePickerView showWithDate:[NSDate dateWithTimeIntervalSinceNow:24*60*60]];
    zwlDatePickerView.delegate = self;
}


#pragma mark - ZWLDatePickerViewDelegate
- (void)zwlDatePickerView:(ZWLDatePickerView *)zwlDatePickerView DidSelectedDate:(NSDate *)date {
    
    NSLog(@"选择的日期是：%@", date);
}

@end
